import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:largefriends/res/lf_double_ext.dart';
import 'package:shimmer/shimmer.dart';

import '../../res/lf_color.dart';

class LfProfileLoading extends StatelessWidget {
  const LfProfileLoading({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return LayoutBuilder(builder: (context, constant) {
      return SingleChildScrollView(
        physics: const NeverScrollableScrollPhysics(),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            Padding(
                padding: EdgeInsets.symmetric(horizontal: 10.w),
                child: Shimmer.fromColors(
                  baseColor: color8F8F8F,
                  period: const Duration(seconds: 1),
                  highlightColor: color514F62.withAlpha(10),
                  child: Container(
                    height: ScreenUtil().screenHeight * 2 / 3,
                    width: ScreenUtil().screenWidth - 20.w,
                    decoration: BoxDecoration(
                      color: Colors.white,
                      borderRadius: 10.r.radius,
                    ),
                  ),
                )),
            20.h.sbh,
            Padding(
                padding: EdgeInsets.symmetric(horizontal: 10.w),
                child: Shimmer.fromColors(
                  baseColor: color8F8F8F,
                  period: const Duration(seconds: 1),
                  highlightColor: color514F62.withAlpha(10),
                  child: Container(
                    height: 100.h,
                    width: ScreenUtil().screenWidth - 20.w,
                    decoration: BoxDecoration(
                      color: color210215,
                      borderRadius: 10.r.radius,
                    ),
                  ),
                )),
            20.h.sbh,
            Padding(
                padding: EdgeInsets.symmetric(horizontal: 10.w),
                child: Shimmer.fromColors(
                  baseColor: color8F8F8F,
                  period: const Duration(seconds: 1),
                  highlightColor: color514F62.withAlpha(10),
                  child: Container(
                    height: ScreenUtil().screenHeight * 2 / 3,
                    width: ScreenUtil().screenWidth - 20.w,
                    decoration: BoxDecoration(
                      color: Colors.white,
                      borderRadius: 10.r.radius,
                    ),
                  ),
                )),
          ],
        ),
      );
    });
  }
}
